#ifndef __DBTAG_H__
#define __DBTAG_H__
#include <string>
#include <vector>
#include "dbTree.h"
using namespace std;

namespace db
{

class Tag
{
  public:
    Tag(string tag);
    ~Tag();
    
    void addAppear(TreeVertex* vertex);
    void remAppear(TreeVertex* vertex);
    string getName();
    int getAppearsCount();
    TreeVertex* getAppear(int id);
    
    bool operator< (Tag & rTag);
    bool operator< (string rTag);
    
    bool operator> (Tag & rTag);
    bool operator> (string rTag);
    
    bool operator== (Tag & rTag);
    bool operator== (string rTag);
    
  private:
    string Name;
    vector<TreeVertex*> Appears;
};

}

#endif /* __DBTAG_H__ */